package thread;

/**
 * 继承Thread类
 */

class MyThread extends Thread {
    @Override
    public void run() {
        //线程的入口方法
        System.out.println("hello world");
    }
}

public class ThreadDemo1 {
    public static void main(String[] args) {
        Thread t = new MyThread();
        //调用start方法,
        t.start();
    }
}
